package com.edu.shiro.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import com.edu.shiro.domain.SysUser;
import com.edu.shiro.service.SysUserService;

@RestController
public class TestController {
	
	@Autowired
	private SysUserService sysUserService;
	
	@GetMapping("/user/{name}")
	public SysUser getUser(@PathVariable String name){
		SysUser user = sysUserService.getSysUserByname(name);
		return user;	
	}
}
